    var reverse = function (x) {
        //判断是否是临界值
        const M = Math.pow(2, 31)
        // 判断是否为负数
        let unit = true
        if (x < 0) {
            unit = false
            x = Math.abs(x)
        }
        let s = ''
        while (x > 0) {
            s += x % 10
            if (s > M - 1 || s < -M) {
                return 0;
            }
            x = parseInt(x / 10)
        }

        return unit ? s : -s
    };

    // console.log('reverse ===> ', reverse(123456))
    console.log('reverse ===> ', reverse(1534236469))